﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp14
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("---------------欢 迎 进 入 英 雄 联 盟 猜 拳 游 戏--------------");
            Console.WriteLine();
            Console.WriteLine("*********************猜拳开始***********************");
            Console.WriteLine();
            Console.WriteLine("出拳规则：1.剪刀 2.石头 3.布");
            Console.WriteLine("请输入你的名字");
            string name = Console.ReadLine();
            Me me = new Me(name);
           
            Judgment judgment = new Judgment();
            Console.WriteLine("请选择你对战的角色：1.迪莫 2.小法 3.亚索");
            int a = int.Parse(Console.ReadLine());
            string str = Convert.ToString(a);
            switch (str)
            {
                case "1":
                    str = "迪莫";
                    break;
                case "2":
                    str = "小法";
                    break;
                case "3":
                    str = "亚索";
                    break;
                default:
                    break;
            }

             Mdf mdf = new Mdf(name,str);
            switch (a)
            {
                case 1:
                    Console.WriteLine("{0} vs 迪莫", name);
                    dong(ad,mdf,judgment);
                    break;
                case 2:
                    Console.WriteLine("{0} vs 小法", name);
                    dong(ad, mdf, judgment);
                    break;
                case 3:
                    Console.WriteLine("{0} vs 亚索", name);
                    dong(ad, mdf, judgment);
                    break;
                default:
                    break;
                    
            }
            
        }
        public static void dong(Ad ad,Mdf mdf,Judgment judgment)
        {

                Console.WriteLine("游戏开始吗？<y/n>");
                string str = Console.ReadLine();
                switch (str)
                {
                    case "y":
                    dong2(ad, mdf, judgment);
                        break;
                    case "n":

                        break;
                }
            }
        public static void dong2(Ad ad, Mdf mdf, Judgment judgment) {
            while (true)
            {
                int p1 = ad.Test1();
                int p2 = mdf.NPC1();
                judgment.Date(p1,p2);
                Console.WriteLine("是否进行下一轮？<y/n>");
                string str = Console.ReadLine();
                switch (str)
                {
                    case "y":
                        dong2(ad, mdf, judgment);
                        break;
                    case "n":
                        judgment.Date1();
                        break;
                }
                break;
            }
        }
        }
    }
